/*
 * writer.cpp
 *
 *  Created on: 2012-9-26
 *      Author: Administrator
 */
#include "writer.hpp"



void writeToFile( FILE* file , const void* data , size_t size ) {
	size_t wrote = 0 ;
	do {
		size -= wrote ;
		wrote = fwrite( data , 1 , size , file ) ;
	}while( wrote > 0 && wrote < size ) ;
}


int writeModule( ProtocolModule *module ) {
	writeCppModule( module ) ;
	writeCsModule( module ) ;
	return 0 ;
}

